const mongoose=require("mongoose")
let Schema=mongoose.Schema;

mongoose.connect("mongodb://127.0.0.1:27017/blog",{
    useNewUrlParser:true,
    useUnifiedTopology:true
}).then(()=>{
    console.log("文章留言数据库")
})

let detailmsgTable=mongoose.model("detailmsgTable",new Schema({
    name:{
        type:String,
        required:true
    },
    mId:{
        type:String,
        required:true
    },
    msg:{
        type:String,
        required:true
    },
    currentTime:{
        type:Date,
        default:Date.now
    }
}))

module.exports={
    detailmsgTable
}